From b99e54f2dd7f7fe8efb2052162114fda351d49b5 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Sat, 15 May 2004 04:18:08 +0000 Subject: [PATCH] Put back the ref_count field in the GdkDragContextPrivateWin32 struct (but 2004-05-15 Tor Lillqvist * gdk/win32/gdkdnd-win32.c: Put back the ref_count field in the GdkDragContextPrivateWin32 struct (but inside ifdef OLE2_DND this time). It is used by the OLE2_DND code, which is unfinished and presumably horribly broken, but still, let's not make it not compile on purpose. Silence some gcc warnings in the OLE2_DND code. --- ChangeLog | 9 +++++++++ ChangeLog.pre-2-10 | 9 +++++++++ ChangeLog.pre-2-6 | 9 +++++++++ ChangeLog.pre-2-8 | 9 +++++++++ gdk/win32/gdkdnd-win32.c | 15 ++++++++++----- 5 files changed, 46 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index bdf6563ed2..c8f52e87f2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2004-05-15 Tor Lillqvist + + * gdk/win32/gdkdnd-win32.c: Put back the ref_count field in the + GdkDragContextPrivateWin32 struct (but inside ifdef OLE2_DND this + time). It is used by the OLE2_DND code, which is unfinished and + presumably horribly broken, but still, let's not make it not + compile on purpose. Silence some gcc warnings in the OLE2_DND + code. + 2004-05-14 Matthias Clasen * gtk/gtktreeview.c (gtk_tree_view_tree_window_to_tree_coords): diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index bdf6563ed2..c8f52e87f2 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,12 @@ +2004-05-15 Tor Lillqvist + + * gdk/win32/gdkdnd-win32.c: Put back the ref_count field in the + GdkDragContextPrivateWin32 struct (but inside ifdef OLE2_DND this + time). It is used by the OLE2_DND code, which is unfinished and + presumably horribly broken, but still, let's not make it not + compile on purpose. Silence some gcc warnings in the OLE2_DND + code. + 2004-05-14 Matthias Clasen * gtk/gtktreeview.c (gtk_tree_view_tree_window_to_tree_coords): diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index bdf6563ed2..c8f52e87f2 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,12 @@ +2004-05-15 Tor Lillqvist + + * gdk/win32/gdkdnd-win32.c: Put back the ref_count field in the + GdkDragContextPrivateWin32 struct (but inside ifdef OLE2_DND this + time). It is used by the OLE2_DND code, which is unfinished and + presumably horribly broken, but still, let's not make it not + compile on purpose. Silence some gcc warnings in the OLE2_DND + code. + 2004-05-14 Matthias Clasen * gtk/gtktreeview.c (gtk_tree_view_tree_window_to_tree_coords): diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index bdf6563ed2..c8f52e87f2 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,12 @@ +2004-05-15 Tor Lillqvist + + * gdk/win32/gdkdnd-win32.c: Put back the ref_count field in the + GdkDragContextPrivateWin32 struct (but inside ifdef OLE2_DND this + time). It is used by the OLE2_DND code, which is unfinished and + presumably horribly broken, but still, let's not make it not + compile on purpose. Silence some gcc warnings in the OLE2_DND + code. + 2004-05-14 Matthias Clasen * gtk/gtktreeview.c (gtk_tree_view_tree_window_to_tree_coords): diff --git a/gdk/win32/gdkdnd-win32.c b/gdk/win32/gdkdnd-win32.c index 7842fdf2b8..400dbe68a3 100644 --- a/gdk/win32/gdkdnd-win32.c +++ b/gdk/win32/gdkdnd-win32.c @@ -65,7 +65,7 @@ typedef enum { #ifdef OLE2_DND #define PRINT_GUID(guid) \ - g_print ("guid = %.08x-%.04x-%.04x-%.02x%.02x-%.02x%.02x%.02x%.02x%.02x%.02x", \ + g_print ("guid = %.08lx-%.04x-%.04x-%.02x%.02x-%.02x%.02x%.02x%.02x%.02x%.02x", \ ((gulong *) guid)[0], \ ((gushort *) guid)[2], \ ((gushort *) guid)[3], \ @@ -88,6 +88,9 @@ static int nformats; * this is used on both source and destination sides. */ struct _GdkDragContextPrivateWin32 { +#ifdef OLE2_DND + gint ref_count; +#endif guint16 last_x; /* Coordinates from last event */ guint16 last_y; HWND dest_xid; @@ -139,6 +142,9 @@ gdk_drag_context_init (GdkDragContext *dragcontext) GdkDragContextPrivateWin32 *private = g_new0 (GdkDragContextPrivateWin32, 1); dragcontext->windowing_data = private; +#ifdef OLE2_DND + private->ref_count = 1; +#endif contexts = g_list_prepend (contexts, dragcontext); } @@ -668,7 +674,7 @@ ienumformatetc_next (LPENUMFORMATETC This, enum_formats *en = (enum_formats *) This; int i, n; - GDK_NOTE (DND, g_print ("ienumformatetc_next %p %d %d\n", This, en->ix, celt)); + GDK_NOTE (DND, g_print ("ienumformatetc_next %p %d %ld\n", This, en->ix, celt)); n = 0; for (i = 0; i < celt; i++) @@ -694,7 +700,7 @@ ienumformatetc_skip (LPENUMFORMATETC This, { enum_formats *en = (enum_formats *) This; - GDK_NOTE (DND, g_print ("ienumformatetc_skip %p %d %d\n", This, en->ix, celt)); + GDK_NOTE (DND, g_print ("ienumformatetc_skip %p %d %ld\n", This, en->ix, celt)); en->ix += celt; return S_OK; @@ -1244,7 +1250,6 @@ gdk_drag_begin (GdkWindow *window, HRESULT hResult; DWORD dwEffect; HGLOBAL global; - FORMATETC format; STGMEDIUM medium; g_return_val_if_fail (window != NULL, NULL); @@ -1285,7 +1290,7 @@ gdk_drag_begin (GdkWindow *window, (hResult == DRAGDROP_S_DROP ? "DRAGDROP_S_DROP" : (hResult == DRAGDROP_S_CANCEL ? "DRAGDROP_S_CANCEL" : (hResult == E_UNEXPECTED ? "E_UNEXPECTED" : - g_strdup_printf ("%#.8x", hResult)))))); + g_strdup_printf ("%#.8lx", hResult)))))); dobj->ido.lpVtbl->Release (&dobj->ido); ctx->ids.lpVtbl->Release (&ctx->ids); -- 2.30.2